Repository navigation
Find rfl::Short and rfl::Positional through other wrappers in rfl::cli - #33
Open
clockblocker wants to merge 1 commit into
Open
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
clockblocker
force-pushed
the
cli-wrapped-short-positional
branch
from
November 16, 2026 05:18
3e798d4 to
9fe1834
Compare
clockblocker
force-pushed
the
wave-base-4
branch
from
November 17, 2026 04:18
264645e to
66b7a13
Compare
clockblocker
force-pushed
the
cli-wrapped-short-positional
branch
from
November 17, 2026 04:18
9fe1834 to
0dcded3
Compare
clockblocker
force-pushed
the
wave-base-4
branch
from
November 17, 2026 05:11
66b7a13 to
773baae
Compare
clockblocker
force-pushed
the
cli-wrapped-short-positional
branch
from
November 17, 2026 05:11
0dcded3 to
6e47779
Compare
clockblocker
force-pushed
the
wave-base-4
branch
from
November 17, 2026 07:15
773baae to
da208f8
Compare
clockblocker
force-pushed
the
cli-wrapped-short-positional
branch
from
November 17, 2026 07:15
6e47779 to
a07549c
Compare
rfl::cli only recognized rfl::Short and rfl::Positional as the outermost wrapper of a field, so `rfl::Description<"...", rfl::Short<"o", T>>` had no `-o` and `std::optional<rfl::Positional<T>>` was not positional. The option table now finds them through DefaultVal, std::optional, Description, Rename and Deprecated, in any order. Every Short and Positional counts wherever it sits: positional fields take bare arguments in declaration order, two fields with the same short name are an error, and a field with more than one Short or Positional does not compile. Co-Authored-By: Claude Opus 5.5 <[email protected]>
clockblocker
force-pushed
the
wave-base-4
branch
from
November 17, 2026 09:20
da208f8 to
9a90181
Compare
clockblocker
force-pushed
the
cli-wrapped-short-positional
branch
from
November 17, 2026 09:20
a07549c to
4f0ce95
Compare
Owner
Author
|
AI-drafted: a behaviour change in this PR, for the record. With this PR a struct Args {
rfl::Description<"Input file", rfl::Positional<std::string>> input;
rfl::Positional<std::string> output;
};
The only input that parsed on main and fails now is |
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Finds
rfl::Shortandrfl::Positionalthroughrfl::DefaultVal,std::optional,rfl::Description,rfl::Rename, andrfl::Deprecatedin any nesting order inrfl::cli.Example
Key details
ShortandPositionalbehaves identically to a bare one (flags, value options, declaration-order positionals, duplicate-short checks).Short/Positionalwrappers on the same field (e.g.Short<"o", Description<"...", Positional<T>>>) is now a compile-time error instead of silently ignoring the inner one.rfl::Renamestill applies only as the outermost wrapper.cli.md("Combining wrappers").AI-authored. Depends on: #22.